package com.sosee.cgfw.fragment;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.lidroid.xutils.BitmapUtils;
import com.lidroid.xutils.HttpUtils;
import com.sosee.cgfw.R;

/**
 * Created by Thinkpad on 2016/4/22.
 * //启动时 加载的广告滑动页
 */
public class SplashAdFragment extends Fragment {
    private View view;
    private HttpUtils httpUtils;
    private String imgUrl;//加载滑动图片网址
    private BitmapUtils bitmapUtils;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        view=inflater.inflate(R.layout.fragment_splash_ad,null);
        initData();
        return view;
    }

    public void initData(){
        bitmapUtils=new BitmapUtils(getActivity());
        httpUtils=new HttpUtils();
        imgUrl=getArguments().getString("url", "");
    }

    @Override
    public void onStart() {
        super.onStart();
        bitmapUtils.display(view,imgUrl);
    }
}
